package com.clz.festec;

import android.app.Application;

import com.blankj.utilcode.util.Utils;
import com.clz.latte.app.ConfigUrator;
import com.clz.latte.app.Latte;
import com.clz.latte.ec.database.DataBaseManager;
import com.clz.latte.ec.icon.FontEcModule;
import com.clz.latte.net.interceptors.DebugInterceptor;
import com.facebook.stetho.Stetho;
import com.joanzapata.iconify.fonts.FontAwesomeModule;

/**
 * Created by Administrator on 2017/11/8.
 */

public class ExampleApp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        final ConfigUrator configUrator = Latte.init(this);
        configUrator
                .withIcon(new FontAwesomeModule())
                .withIcon(new FontEcModule())
                .withApiHost("http://192.168.1.110:82/RestServer/api/")
                .withInterceptor(new DebugInterceptor("test", R.raw.test))
                .config();
        Utils.init(this);
        DataBaseManager.getInstance().init(this);
        initStetho();
    }

    public void initStetho() {
        Stetho.initialize(
                Stetho.newInitializerBuilder(this)
                        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this)).build());
    }
}
